<?php

/**
 * VENTANAPRINCIPAL actions.
 *
 * @package    OPENBIBLIOSOFT
 * @subpackage VENTANAPRINCIPAL
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 12479 2008-10-31 10:54:40Z fabien $
 */
class VENTANAPRINCIPALActions extends sfActions
{
 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
  public function executeIndex(sfWebRequest $request)
  {
	if($this->getUser()->getAttribute('codigoUsuario') == null)
	{
		return  $this->renderText("<script type='text/javascript'> window.location = 'ENTRADA'; </script> ");
	}
  }
  
	public function executeDesautenticar()
	{
		//session_destroy();
		$this->getUser()->getAttributeHolder()->clear();
		return  $this->renderText("({success: true, mensaje:'finaliza sesion'})");
	}
}
